package cn.wolfcode.shop.cloud.util;

import cn.wolfcode.shop.cloud.redis.KeyPrefix;

public class SeckillKeyPrefixUtil implements KeyPrefix {
    private int expireTime;

    private String Prefix;

    public SeckillKeyPrefixUtil(int expireTime, String prefix) {
        this.expireTime = expireTime;
        Prefix = prefix;
    }

    public SeckillKeyPrefixUtil() {
    }

    @Override
    public String getPrefix() {
        return this.Prefix;
    }

    @Override
    public int getExpireTime() {
        return this.expireTime;
    }

    public static final SeckillKeyPrefixUtil SECKILL_ORDER = new SeckillKeyPrefixUtil(0,"seckill_order:");

    public static final SeckillKeyPrefixUtil SECKILL_STOCK_COUNT = new SeckillKeyPrefixUtil(0,"stoke_count:");

    public static final SeckillKeyPrefixUtil SECKILL_HASH = new SeckillKeyPrefixUtil(0,"seckill_hash");

    public static final SeckillKeyPrefixUtil SECKILL_PATH = new SeckillKeyPrefixUtil(3,"seckill_path");

    public static final SeckillKeyPrefixUtil SECKILL_VERIFYCODE = new SeckillKeyPrefixUtil(60,"seckill_verifycode");

}
